package com.runshu.newsmartark.mvp.presenter;


import com.runshu.newsmartark.mvp.contract.QRcodeAuthContract;
import com.runshu.newsmartark.network.netbean.ResponseBean;
import com.runshu.newsmartark.network.netinterface.MyCallBack;

/**
 * Demo class
 *
 * @author yu
 * @date 2020/8/10
 * @decs：
 */

public class QRcodeAuthPresenter implements QRcodeAuthContract.Presenter {
    private QRcodeAuthContract.View view;
    private QRcodeAuthContract.Model model;

    public QRcodeAuthPresenter(QRcodeAuthContract.View view, QRcodeAuthContract.Model model) {
        this.view = view;
        this.model = model;
    }

    @Override
    public void getWxCodeLogin(String macAddress) {
        model.getWxCodeLogin(macAddress, new MyCallBack() {
            @Override
            public void onSuccess(ResponseBean data) {
                view.onGetWxCodeLoginSuccess(data);
            }

            @Override
            public void onError(ResponseBean data) {

//                view.onError(data.getMessage());
            }
        });

    }
}